import express from 'express';
import medicationController from '../controllers/medication.js';
import medicalRecordController from '../controllers/medicalRecord.js';
const router = express.Router();

//获取用药记录
router.get('/:userId/medication', medicationController.getMedications)

//添加用药记录
router.post('/addMedication', medicationController.addMedication)

//删除用药记录
router.post('/delMedication', medicationController.delMedication)

//获取病历记录
router.get('/:userId/medicalRecord', medicalRecordController.getMedicalRecord)

//添加病历记录
router.post('/addMedicalRecord', medicalRecordController.addMedicalRecord)

//删除病历记录
router.post('/delMedicalRecord', medicalRecordController.delMedicalRecord)

export default router;  
